CPP = g++
Flag = -g -fPIC

.PHONY: all clean test server client

CPPS = $(wildcard *.cpp )
OBJS = $(patsubst %.cpp, %.o, $(CPPS))
INCLUDE = -I ./

.PHONY: all clean server client

all : server

$(OBJS): $(CPPS)
	$(CPP) $(Flag) -c  $(CPPS)  $(INCLUDE)

server: $(OBJS)
	cd serverdir && make
client: $(OBJS)
	cd clientdir && make

clean:
	rm -f *.o 
	cd serverdir && make clean
	cd clientdir && make clean

